home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / lotus / lotus025.dsk / DATASET.LSS < prev    next >
Text File  |  1995-06-26  |  1KB  |  31 lines

  1.     ' Datasets are named sets of variables that can be attached to most objects
  2.     ' Attach a dataset to the active document
  3.     
  4.     ' create a name for this dataset
  5.     ' each dataset is indexed by name
  6.     ' within each named dataset, multiple entries can be stored
  7.     
  8.     Dim SetName As String    
  9.     SetName = "CustomSet"    
  10.     
  11.     Dim MyDataSet As WPDataSetCollection    
  12.     
  13.     ' Set MyData = Object
  14.     ' Set MyDataSet = .Frame.Layout.WPDataset ' attach dataset to current frame
  15.     Set MyDataSet = .ActiveDocument.WPDataSets
  16.     
  17.     Stat = MyDataSet(SetName$).SetData("Entry1","This is data for entry1")
  18.     Stat = MyDataSet(SetName$).SetData("Entry2","Store any text here")
  19.     
  20.     ' print the number of datasets attached to this document
  21.     ' get the count for the WPDataSets collection for this object
  22.     
  23.     Print "Number of datasets attached to object = " MyDataSet.Count
  24.     Print MyDataSet(SetName$).Getdata("Entry1","Default")
  25.     Print MyDataSet(SetName$).Getdata("Entry2","Default")
  26.     
  27.     
  28.     Forall CurrentSet In MyDataSet
  29.         Print CurrentSet.Name
  30.     End Forall
  31.